﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteMaster.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="Microhard.Framework.MVCHelper" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
  产品管理
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
 <div class="section-header">
        <div class="title">
            <img src="<%=Url.Content("~/Content/images/ico-catalog.png")%>" alt="" />
           产品管理
        </div>
        <div class="options">
        </div>
    </div>
    <p>
    </p>
     
 <table class="adminContent"> 
        <tr>
            <td>           
                <%Html.Telerik().Grid<Microhard.WarehouseInsp.Buz.Models.ProductListModel>((List<Microhard.WarehouseInsp.Buz.Models.ProductListModel>)this.Model.Data)
                    .Name("operation-grid")
                    .ToolBar(t => t.Template(g =>
                    { %>
                    
                <div class="header-menu">
                    <ul class="t-widget t-reset t-header t-menu">
                        <li class="t-item  t-state-default">
                            <%=Html.Authorized_AddButton("btnAdd", "添加", "Create", "ProductList")%>
                        </li>
                        <li class="t-item  t-state-default">
                            <%=Html.Authorized_UpdateButton("btnUpdate", "修改", "operation-grid", "Update", "ProductList", "WarehouseInsp")%>
                        </li>
                        <li class="t-item  t-state-default">
                            <%=Html.Authorized_DeleteButton("btnDelete", "删除", "operation-grid", "Delete", "ProductList", "WarehouseInsp")%>
                        </li>                   
                          
                    </ul>
                </div>
               
                <%}))
                         .Columns(columns =>
                    {
                        columns.Bound(x => x.ProductID)
                       .Template(x => Html.CheckBox("checkedRecords", new { value = x.ProductID, @class = "gridCks" }))
                       .ClientTemplate("<input type='checkbox' name='checkedRecords' value='<#= ProductID #>' class='gridCks'/>")
                     .HtmlAttributes(new { style = "text-align:center" }).Title("选择");

                       
                        columns.Bound(x => x.Name).Title("产品名称");
                        columns.Bound(x => x.Size).Title("大小");
                        columns.Bound(x => x.Suit).Title("规格");                      
                      
                    })
                      .Pageable(settings => settings.Total(Model.Total).PageSize(Html.GetGridPageSize()).Position(GridPagerPosition.Top))
                     .DataBinding(dataBinding => dataBinding.Ajax().Select("_List", "ProductList"))
                      .EnableCustomBinding(true)
                    .Render();
                %>
                
            </td>
        </tr>
    </table>
      
</asp:Content>

